﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace KWT.DRG_DIP.API.Migrations
{
    /// <inheritdoc />
    public partial class _20250422140350 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "List_Suggest",
                columns: table => new
                {
                    LSID = table.Column<string>(type: "varchar(255)", nullable: false, comment: "")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ListID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "清单ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CertNo = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "患者证件号码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Code = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "病种编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "病种名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Point = table.Column<decimal>(type: "decimal(18,6)", precision: 6, nullable: false, comment: "点数"),
                    Score = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "分值"),
                    Mag = table.Column<decimal>(type: "decimal(18,6)", precision: 6, nullable: false, comment: "倍率"),
                    MagType = table.Column<int>(type: "int", nullable: false, comment: "倍率类型 1：高倍率 2：低倍率 0：正常"),
                    InsuranceType = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "医保类型")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    FeeRemain = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "费用结余"),
                    FeeStandard = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "付费标准（元）"),
                    CurrentFee = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "当前费用（元）"),
                    ZYTSBGZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "住院天数标杆值(天)"),
                    InDays = table.Column<int>(type: "int", nullable: false, comment: "当前住院时间（天）"),
                    ListScore = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: ""),
                    Deduct = table.Column<int>(type: "int", nullable: false, comment: ""),
                    QC_Json = table.Column<string>(type: "varchar(4000)", maxLength: 4000, nullable: false, comment: "")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Suggest_Json = table.Column<string>(type: "varchar(4000)", maxLength: 4000, nullable: false, comment: "")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_List_Suggest", x => x.LSID);
                },
                comment: "预分组插件-推荐信息")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "List_Suggest");
        }
    }
}
